﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.HipcConfigurationTools.Domain
{
    /// <summary>
    /// 获取状态信息的应答
    /// </summary>
    /// <remarks>
    /// typedef  struct
    /// {
    ///     T_HIPC_NET_HEADER      head;
    ///     Uint8   temperature;      //当前温度  
    ///     Uint16  runTime;       //系统运行时间
    ///     Uint16  runState;       //运行状态  
    ///     Uint8   cpuLoad;       //CPU占用率
    ///     Uint8   freeMem;       //空余内存         
    /// } T_HIPC_SYS_STATE_RESP;
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct T_HIPC_SYS_STATE_RESP
    {
        #region Fields

        /// <summary>
        /// 网络协议数据头
        /// </summary>
        public T_HIPC_NET_HEADER head;

        /// <summary>
        /// 当前温度
        /// </summary>
        public byte temperature;

        /// <summary>
        /// 系统运行时间
        /// </summary>
        public UInt16 runTime;

        /// <summary>
        /// 运行状态
        /// </summary>
        public UInt16 runState;

        /// <summary>
        /// CPU占用率
        /// </summary>
        public byte cpuLoad;

        /// <summary>
        /// 空余内存
        /// </summary>
        public byte freeMem;

        #endregion
    }
}
